/*Create state and behavior info for the class TV.
 * 
 * Class should have boolean, int and string info.
 * 
 */
//
public class Tv {

	// These are all state information.
	int screenSize;
	int soundLevel;
	int channels;
	String brand;
	String type;
	boolean isPowerOn;

	// this method shows the result of the sound level or volume based on the
	// tv's volumelevel when the tv
	// is power on.
	// otherwise showed it in console.

	void displayResult() {

		System.out.println("Tv brand is sony");
		System.out.println("Tv screenSize is 45inches");
		System.out.println("Tv type is LED");

		if (isPowerOn) {

			System.out.println("Tv is on");
		} else {
			System.out.println("Tv is off");
		}

	}

	int increaseSoundLevel(int numberOfSoundLevel) {

		if (isPowerOn) {
			soundLevel = soundLevel + numberOfSoundLevel;
		} else {

			System.out.println("Tv is power off and there is no sound");
		}
		return soundLevel;

	}

	// This method displays the name of the channel based on the channel number
	// if the TV is on,
	// otherwise displays a message on the console.

	void displayChannelName() {

		if (isPowerOn) {

			String channelName = "";

			switch (channels) {
			case 1:
				channelName = "SUN";

				break;
			case 2:
				channelName = "ABC";
				break;
			case 3:
				channelName = "RAJ";
				break;
			case 4:
				channelName = "STAR";
				break;
			case 5:
				channelName = "TEJA";
				break;
			default:
				break;

			}
			System.out.println(channelName);

		} else {
			System.out.println("turn on the tv");
		}

	}

	boolean isSportsChannel(int channels) {

		if (isPowerOn && channels == 4) {
			System.out.println("This is a sports channel");
			return true;

		} else {

			System.out.println("this is not a sports channel");
			return false;
		}

	}

}
